import os

DEBUG = False

# dialect+driver://username:password@host:port/database
DIALECT = 'mysql'
DRIVER = 'mysqldb'
USERNAME = 'root'
PASSWORD = '123456'
HOST = '127.0.0.1'
PORT = '3306'
DATABASE = 'bbs'

SQLALCHEMY_DATABASE_URI = "{}+{}://{}:{}@{}:{}/{}?charset=utf8".format(DIALECT, DRIVER, USERNAME, PASSWORD, HOST, PORT,
                                                                       DATABASE)

SQLALCHEMY_TRACK_MODIFICATIONS = False
# SECRET_KEY = os.urandom(24)
SECRET_KEY = "aasdadsasdasdadASD"
CMS_USER_ID = "ASDASASDASD"
FRONT_USER_ID = "asdadasdAAAA"

# 发送邮件信息,要配置为等号
MAIL_SERVER = "smtp.qq.com"
MAIL_PORT = "465"
# MAIL_USE_TLS : True    #端口是"587"
MAIL_USERNAME = "1807229495@qq.com"
MAIL_PASSWORD = "swwnklpqgnaudbde"
MAIL_DEFAULT_SENDER = "1807229495@qq.com"
MAIL_USE_SSL = True

# 阿里大鱼配置
KEY_ID = "LTAI4G6py64nEkMdiJ6nVCvD"
ACCESS_SECRET = "CABmA28x36Ntuy50aFQtqfZPR05QNN"
SMS_SIGN_NAME_FIELD = "python论坛"
SMS_TEMPLATE_CODE_FIELD = "SMS_189520152"

# 配置ueditor
UEDITOR_UPLOAD_PATH = os.path.join(os.path.dirname(__file__), "images")

# 分页的配置
PER_PAGE = 8

# tasks celery配置
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/0'
